<?php include 'application/views/header.php' ?>
<?php include 'application/views/left.php' ?>

<!-- BOX NEWS -->
<div class="content-box contact-index">
    <div class="title">
        <div class="label">Liên hệ</div>
        <div class="end-title"></div>
    </div>
    <!-- content -->
    <div class="contact-index-content">
        <h3><?php echo $Config['COMPANY_NAME'] ?></h3>
        <ul>
            <li>Địa chỉ: <?php echo $Config['COMPANY_ADDRESS'] ?></li>
            <li>Điện thoại: <?php echo $Config['COMPANY_PHONE'] ?></li>
            <li>Email: <?php echo $Config['COMPANY_EMAIL'] ?></li>
        </ul>
        <?php if($this->session->flashdata('message') != ''): ?>
            <div class="flash-message"><?php echo $this->session->flashdata('message'); ?></div>
        <?php endif; ?>
        <form id="frmContact" method="post">
            <div class="row">
                <div class="label">Tên của bạn</div>
                <div class="value"><input type="text" value="" name="ContactName" id="ContactName" /></div>
            </div>
            <div class="row">
                <div class="label">Địa chỉ</div>
                <div class="value"><input type="text" value="" name="ContactAddress" id="ContactAddress" /></div>
            </div>
            <div class="row">
                <div class="label">Điện thoại</div>
                <div class="value"><input type="text" value="" name="ContactPhone" id="ContactPhone" /></div>
            </div>
            <div class="row">
                <div class="label">Email</div>
                <div class="value"><input type="text" value="" name="ContactEmail" id="ContactEmail" /></div>
            </div>
            <div class="row">
                <div class="label">Nội dung</div>
                <div class="value"><textarea cols="50" rows="7" name="ContactContent" id="ContactContent"></textarea></div>
            </div>
            <div class="row">
                <input type="submit" value="Gửi" />
                <input type="reset" value="Hủy" />
            </div>
        </form>
    </div>
</div>

<?php include 'application/views/right.php' ?>
<?php include 'application/views/footer.php' ?>

<script type="text/javascript">
$('#frmContact').validate({
    rules: {
        ContactName : 'required',
        ContactAddress : 'required',
        ContactEmail : {
            required: true,
            email: true
        },
        ContactContent : 'required',
        ContactPhone : 'number'
    },
    messages: {
        ContactName : '',
        ContactAddress : '',
        ContactEmail : '',
        ContactContent : '',
        ContactPhone: ''
    }
});
</script>